package com.jdrx.ocp.beans.vo;

import com.jdrx.ocp.beans.entity.util.UrlUtils;

import java.io.Serializable;
import java.util.List;

/**
 * 用户拥有的资源
 * @Author: Huangxg
 * @Date: 2018/11/22 16:14
 */
public class QueryUserResourceVO implements Serializable {
    /**
     * 数据ID
     */
    private Long id;
    /**
     * 上级ID
     */
    private Long pId;
    /**
     * 资源名称
     */
    private String name;
    /**
     * 资源地址
     */
    private String url;
    /**
     * 平台标识符
     */
    private String prefix;
    /**
     * 资源类型（0表示菜单；1表示按钮）
     */
    private Integer type;
    /**
     * 菜单图标
     */
    private String menuIcon;
    /**
     * 资源标识符
     */
    private String nameEn;
    /**
     * 资源排序
     */
    private Integer sort;
    /**服务类型(0：内部服务；1：外部服务)*/
    private Integer serverType;

    /**
     * 服务分组
     */
    private String serviceGroup;
    /**
     * url的路由地址
     */
    private String router;

    private String title;
    private String logo;
    private String favicon;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getFavicon() {
        return favicon;
    }

    public void setFavicon(String favicon) {
        this.favicon = favicon;
    }

    private List<QueryUserResourceVO> children;

    public String getRouter() {
        return UrlUtils.getRouter(url);
    }

    public String getServiceGroup() {
        return serviceGroup;
    }

    public void setServiceGroup(String serviceGroup) {
        this.serviceGroup = serviceGroup;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getpId() {
        return pId;
    }

    public void setpId(Long pId) {
        this.pId = pId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getMenuIcon() {
        return menuIcon;
    }

    public void setMenuIcon(String menuIcon) {
        this.menuIcon = menuIcon;
    }

    public String getNameEn() {
        return nameEn;
    }

    public void setNameEn(String nameEn) {
        this.nameEn = nameEn;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    public Integer getServerType() {
        return serverType;
    }

    public void setServerType(Integer serverType) {
        this.serverType = serverType;
    }

    public List<QueryUserResourceVO> getChildren() {
        return children;
    }

    public void setChildren(List<QueryUserResourceVO> children) {
        this.children = children;
    }
}
